g_value_init (&value, pspec->value_type);
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (pspec->value_type == GTK_TYPE_THEMING_ENGINE)
g_value_set_object (&value, gtk_theming_engine_load (NULL));
else if (pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
}
else if (pspec->value_type == g_type_from_name ("GdkColor"))
{
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GdkColor color;
gdk_color_parse ("pink", &color);
g_value_set_boxed (&value, &color);
-G_GNUC_END_IGNORE_DEPRECATIONS
}
else if (pspec->value_type == GTK_TYPE_BORDER)
{
}
else
g_param_value_set_default (pspec, &value);
+G_GNUC_END_IGNORE_DEPRECATIONS
result = _gtk_css_typed_value_new (&value);
g_value_unset (&value);
GtkThemingEngine *engine;
char *str;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
if (_gtk_css_parser_try (parser, "none", TRUE))
{
g_value_set_object (value, gtk_theming_engine_load (NULL));
g_value_set_object (value, engine);
g_free (str);
return TRUE;
+
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
string_value_parse,
string_value_print,
NULL);
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
register_conversion_function (GTK_TYPE_THEMING_ENGINE,
theming_engine_value_parse,
theming_engine_value_print,
NULL);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
register_conversion_function (GTK_TYPE_BORDER,
border_value_parse,
border_value_print,
const GtkCssValue *css_value,
GValue *value)
{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_value_init (value, GTK_TYPE_THEMING_ENGINE);
g_value_set_object (value, _gtk_css_engine_value_get_engine (css_value));
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static GtkCssValue *
NULL,
_gtk_css_image_effect_value_new (GTK_CSS_IMAGE_EFFECT_NONE));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_css_style_property_register ("engine",
GTK_CSS_PROPERTY_ENGINE,
GTK_TYPE_THEMING_ENGINE,
engine_query,
engine_assign,
_gtk_css_engine_value_new (gtk_theming_engine_load (NULL)));
+G_GNUC_END_IGNORE_DEPRECATIONS
/* Private property holding the binding sets */
gtk_css_style_property_register ("gtk-key-bindings",
#include "fallback-c89.c"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* SECTION:gtkthemingengine
* @Short_description: Theming renderers
* @Title: GtkThemingEngine
* @See_also: #GtkStyleContext
*
- * #GtkThemingEngine is the object used for rendering themed content
- * in GTK+ widgets. Even though GTK+ has a default implementation,
- * it can be overridden in CSS files by enforcing a #GtkThemingEngine
- * object to be loaded as a module.
- *
- * In order to implement a theming engine, a #GtkThemingEngine subclass
- * must be created, alongside the CSS file that will reference it, the
- * theming engine would be created as an .so library, and installed in
- * $(gtk-modules-dir)/theming-engines/.
+ * #GtkThemingEngine was the object used for rendering themed content
+ * in GTK+ widgets. It used to allow overriding GTK+'s default
+ * implementation of rendering functions by allowing engines to be
+ * loaded as modules.
*
- * #GtkThemingEngines have limited access to the object they are
- * rendering, the #GtkThemingEngine API has read-only accessors to the
- * style information contained in the rendered object’s #GtkStyleContext.
+ * #GtkThemingEngine has been deprecated in GTK+ 3.14 and will be
+ * ignored for rendering. The advancements in CSS theming are good
+ * enough to allow themers to achieve their goals without the need
+ * to modify source code.
*/
enum {
* to the currently rendered element.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_property (GtkThemingEngine *engine,
* rendered element.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_valist (GtkThemingEngine *engine,
* rendered element.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get (GtkThemingEngine *engine,
* Gets the value for a widget style property.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
* currently rendered content’s style.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_style_valist (GtkThemingEngine *engine,
* to the currently rendered content’s style.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_style (GtkThemingEngine *engine,
* Looks up and resolves a color name in the current style’s color map.
*
* Returns: %TRUE if @color_name was found and resolved, %FALSE otherwise
+ *
+ * Since: 3.0
+ *
+ * Deprecated: 3.14
**/
gboolean
gtk_theming_engine_lookup_color (GtkThemingEngine *engine,
* Returns: the state flags
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
GtkStateFlags
gtk_theming_engine_get_state (GtkThemingEngine *engine)
* Returns: (transfer none): A #GtkWidgetPath
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
const GtkWidgetPath *
gtk_theming_engine_get_path (GtkThemingEngine *engine)
* Returns: %TRUE if @engine has @class_name defined
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
gboolean
gtk_theming_engine_has_class (GtkThemingEngine *engine,
* Returns: the widget direction
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
GtkJunctionSides
gtk_theming_engine_get_junction_sides (GtkThemingEngine *engine)
* Gets the foreground color for a given state.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_color (GtkThemingEngine *engine,
* Gets the background color for a given state.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_background_color (GtkThemingEngine *engine,
* Gets the border color for a given state.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_border_color (GtkThemingEngine *engine,
* Gets the border for a given state as a #GtkBorder.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_border (GtkThemingEngine *engine,
* Gets the padding for a given state as a #GtkBorder.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_padding (GtkThemingEngine *engine,
* Gets the margin for a given state as a #GtkBorder.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14
**/
void
gtk_theming_engine_get_margin (GtkThemingEngine *engine,
*
* Returns: (transfer none): A theming engine, or %NULL if
* the engine @name doesn’t exist.
+ *
+ * Deprecated: 3.14
**/
GtkThemingEngine *
gtk_theming_engine_load (const gchar *name)
* Returns the #GdkScreen to which @engine currently rendering to.
*
* Returns: (transfer none): a #GdkScreen, or %NULL.
+ *
+ * Deprecated: 3.14
**/
GdkScreen *
gtk_theming_engine_get_screen (GtkThemingEngine *engine)
cairo_restore (cr);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
gpointer padding[14];
};
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GType gtk_theming_engine_get_type (void) G_GNUC_CONST;
/* function implemented in gtkcsscustomproperty.c */
GtkStylePropertyParser parse_func,
GParamSpec *pspec);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_property (GtkThemingEngine *engine,
const gchar *property,
GtkStateFlags state,
GValue *value);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_valist (GtkThemingEngine *engine,
GtkStateFlags state,
va_list args);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get (GtkThemingEngine *engine,
GtkStateFlags state,
...) G_GNUC_NULL_TERMINATED;
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
const gchar *property_name,
GValue *value);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_style_valist (GtkThemingEngine *engine,
va_list args);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_style (GtkThemingEngine *engine,
...);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
gboolean gtk_theming_engine_lookup_color (GtkThemingEngine *engine,
const gchar *color_name,
GdkRGBA *color);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
const GtkWidgetPath * gtk_theming_engine_get_path (GtkThemingEngine *engine);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
gboolean gtk_theming_engine_has_class (GtkThemingEngine *engine,
const gchar *style_class);
GDK_DEPRECATED_IN_3_14
const gchar *style_region,
GtkRegionFlags *flags);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GtkStateFlags gtk_theming_engine_get_state (GtkThemingEngine *engine);
GDK_DEPRECATED_IN_3_6
gboolean gtk_theming_engine_state_is_running (GtkThemingEngine *engine,
GDK_DEPRECATED_IN_3_8_FOR(gtk_theming_engine_get_state)
GtkTextDirection gtk_theming_engine_get_direction (GtkThemingEngine *engine);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GtkJunctionSides gtk_theming_engine_get_junction_sides (GtkThemingEngine *engine);
/* Helper functions */
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_color (GtkThemingEngine *engine,
GtkStateFlags state,
GdkRGBA *color);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_background_color (GtkThemingEngine *engine,
GtkStateFlags state,
GdkRGBA *color);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_border_color (GtkThemingEngine *engine,
GtkStateFlags state,
GdkRGBA *color);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_border (GtkThemingEngine *engine,
GtkStateFlags state,
GtkBorder *border);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_padding (GtkThemingEngine *engine,
GtkStateFlags state,
GtkBorder *padding);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_theming_engine_get_margin (GtkThemingEngine *engine,
GtkStateFlags state,
GtkBorder *margin);
const PangoFontDescription * gtk_theming_engine_get_font (GtkThemingEngine *engine,
GtkStateFlags state);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GtkThemingEngine * gtk_theming_engine_load (const gchar *name);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GdkScreen * gtk_theming_engine_get_screen (GtkThemingEngine *engine);
G_END_DECLS